<?php
class model_newagk_collection extends gdl_components_basemodel
{

    public function primarykey() {
        return 'id';
    }

    public function tableName() {
        return 'agk_collection';
    }
	
	public function getInfoArg($arrg,$field)
    {
        return $this->select($arrg, $field)->items;
    }
	//获取用户收藏的试题
	public function cllKeep($identityId,$qbankId=0)
    {
		if(!$identityId) return false;
		$data = ['identityId'=>$identityId,'qbankId'=>$qbankId,'isdelete'=>0];
		if($qbankId){
			$data['qbankId'] = $qbankId;
		}
       $question = $this->getInfoArg($data,'questionId');
	   $questionId = [0];
	   foreach($question as $v){
		   $questionId[] = $v['questionId'];
	   }
	   return $questionId;
    }
}
